package cn.openea.perpartner.meily.web.service;

import cn.openea.perpartner.meily.web.entity.RevenueRecordsArc;
import cn.openea.perpartner.meily.web.entity.vo.RevenueRecordsSearchVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * @author ysk
 * @email zane_ysk@qq.com
 * @date 2023-03-22 10:59:41
 */
public interface IRevenueRecordsArcService extends IService<RevenueRecordsArc> {


    List<RevenueRecordsArc> listBySearchVo(RevenueRecordsSearchVo searchVo);

    /**
     * 新增
     *
     * @param revenueRecordsArc 实例对象
     * @return
     */
    boolean add(RevenueRecordsArc revenueRecordsArc);

    /**
     * 收益发放
     *
     * @param ids （收益记录ids）
     * @return 发放失败的id
     */
    List<String> incomeDistribution(List<String> ids);

    /**
     * 单个收益发放
     *
     * @param id id
     * @return
     */
    String singleBilling(String id);

    /**
     * 根据时间段统计累计收益
     *
     * @param timePeriod 时间 精确到月
     * @return
     */
    BigDecimal countCumulative(LocalDate timePeriod);
}

